﻿Imports System.Environment

Public Class frmApropos

    Private Sub frmApropos_Layout(sender As Object, e As System.Windows.Forms.LayoutEventArgs) Handles Me.Layout
        ' Définissez le titre du formulaire.
        Dim ApplicationTitle As String
        If My.Application.Info.Title.Length > 0 Then
            ApplicationTitle = My.Application.Info.Title
        Else
            ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        End If
        Me.Text = String.Format("À propos de {0}", ApplicationTitle)

        ' changer le logo
        Select Case gSocieteCode
            Case "ME"
                PB_LOGO.Image = My.Resources.logo_menuiserie
            Case "PE"
                PB_LOGO.Image = My.Resources.logo_peinture
            Case "PO"
                PB_LOGO.Image = My.Resources.logo_polynet
            Case "PL"
                PB_LOGO.Image = My.Resources.logo_versanit
        End Select

        Me.LabelProductName.Text = My.Application.Info.ProductName
 
        ' effacer la listview
        ListView1.Items.Clear()
        ListView1.Items.Add("Nom serveur")
        ListView1.Items(0).SubItems.Add(GetEnvironmentVariable("COMPUTERNAME"))
        ListView1.Items.Add("Nom client")
        ListView1.Items(1).SubItems.Add(GetEnvironmentVariable("CLIENTNAME"))
        ListView1.Items.Add("Nom utilisateur")
        ListView1.Items(2).SubItems.Add(GetEnvironmentVariable("USERNAME"))
        ListView1.Items.Add("Nom DSN")
        ListView1.Items(3).SubItems.Add(ctDSN_DEVFAC)
        ListView1.Items.Add("Dossier de démarrage")
        ListView1.Items(4).SubItems.Add(My.Application.Info.DirectoryPath)
        ListView1.Items.Add("Version EXE")
        ListView1.Items(5).SubItems.Add(My.Application.Info.Version.ToString)
        ListView1.Items.Add("Développeur")
        ListView1.Items(6).SubItems.Add("Phuoc CAO")

    End Sub

    Private Sub OKButton_Click(sender As System.Object, e As System.EventArgs)
        Me.Close()
    End Sub

End Class